<template>
  <div data-clipboard-action="copy" class="cobyOrderSn p" :data-clipboard-text="text" @click="copyLink">获取投放链接</div>
</template>

<script>
  import clipboard from 'clipboard';

  export default {
    components: {},
    props: {
      text:String
    },
    data() {
      return {
        clipboard:null
      };
    },
    computed: {
    },
    mounted() {
      this.clipboard = new clipboard(".cobyOrderSn");
    },
    methods: {
      copyLink() {
        this.clipboard.on('success', function (a,b,c) {
          console.log(a,b,c)
        });
      }
    }
  };
</script>
<style scoped lang='less'>

</style>
<style lang='less'>

</style>